<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
  <meta http-equiv="X-UA-compatible" content="IE=edge,chrome=1.0"/>
  <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/>
  <title>首页</title>
  <link rel="stylesheet" href="__PUBLIC__/Home/default/static/css/style.css">
  <link rel="stylesheet" href="__PUBLIC__/Home/default/static/css/common.css">
  <link rel="stylesheet" href="__PUBLIC__/Home/default/static/css/main.css">
  <link rel="stylesheet" href="__PUBLIC__/Home/default/static/css/swiper.min.css">
  <script src="__PUBLIC__/Home/default/static/js/swiper.min.js"></script>
  <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
</head>
<body>
<include file="Public/common" />
<div id="banner" class="swiper-container">
  <div class="swiper-wrapper">
    <!--<div class="swiper-slide">
      <img src="__PUBLIC__/Home/default/static/images/image/banner.jpg" alt="">
    </div>
    <div class="swiper-slide">
      <img src="__PUBLIC__/Home/default/static/images/image/banner.jpg" alt="">
    </div>
    <div class="swiper-slide">
      <img src="__PUBLIC__/Home/default/static/images/image/banner.jpg" alt="">
    </div>
    <div class="swiper-slide">
      <img src="__PUBLIC__/Home/default/static/images/image/banner.jpg" alt="">
    </div>
    <div class="swiper-slide">
      <img src="__PUBLIC__/Home/default/static/images/image/banner.jpg" alt="">
    </div>-->
    <foreach name="picture" item="vo">
      <div class="swiper-slide">
        <a href="javascript:void(0)"><img class="img" href="{$vo.href}" src="{$vo.url}" alt=""></a>
      </div>
    </foreach>
    <script>
      $(function()
      {
          $('#banner .img').click(function()
          {
              var href = $(this).attr('href')
              window.open(href)
          })
      })
    </script>
  </div>
  <div class="swiper-pagination"></div>
</div>
<section class="index-section section1">
  <div class="mainTitle">
    <span class="title">热推产品</span>
  </div>
  <div class="content auto">
    <div class="swiper-container">
      <div class="swiper-wrapper">
       <!-- <div class="swiper-slide">
          <a href="product.html">
            <div class="hotShop">
              <div class="top">
                <div class="img">
                  <img src="__PUBLIC__/Home/default/static/images/image/1.jpg" alt="">
                </div>
                <div class="btn-box">
                  <span>在线视频</span>
                </div>
              </div>
              <div class="bottom">
                跆拳道教练欧阳晓飞跆拳道教练欧阳晓飞跆拳道教练欧阳晓飞
              </div>
            </div>
          </a>
        </div>-->
        <foreach name="shop" item="vo">
            <div class="swiper-slide">
              <a href="{:U('Shop/detail',array('id'=>$vo['id']))}">
                <div class="hotShop">
                  <div class="top">
                    <div class="img">
                      <img src="{$vo.picture}" alt="">
                    </div>
                    <div class="btn-box">
                      <span>{$vo.name}</span>
                    </div>
                  </div>
                  <div style="text-align: center;" class="bottom">
                    {$vo.title}
                  </div>
                </div>
              </a>
            </div>
        </foreach>

    <!-- 修改箭头颜色示范 -->
    <div class="swiper-button-prev swiper-button-white btn-prev"></div> <!-- 白色 -->
    <div class="swiper-button-next swiper-button-black btn-next"></div> <!-- 黑色 -->
  </div>
  <div class="index-more">
    <a href="{:U('Shop/index')}">更多产品</a>
  </div>
</section>
<section class="index-section section2">
  <div class="mainTitle">
    <span class="title">新闻资讯</span>
  </div>
  <div class="content auto">
    <div class="swiper-container">
      <div class="swiper-wrapper">
        <foreach name="new" item="vo">
        <div class="swiper-slide">
          <a href="{:U('New/detail',array('id'=>$vo['id']))}">
            <div class="newsItem">
              <div class="top">
                <div class="img">
                  <img src="__PUBLIC__/Home/default/static/images/image/3.jpg" alt="">
                </div>
                <div class="name">{$vo.title}</div>
              </div>
              <div class="bottom">
                {$vo.desc}
              </div>
            </div>
          </a>
        </div>
        </foreach>
      </div>
    </div>
    <!-- 修改箭头颜色示范 -->
    <div class="swiper-button-prev swiper-button-white btn-prev"></div> <!-- 白色 -->
    <div class="swiper-button-next swiper-button-black btn-next"></div> <!-- 黑色 -->
  </div>
  <div class="index-more">
    <a href="{:U('New/index')}">更多资讯</a>
  </div>
</section>
<include file="Public/fotter" />
<script>
    $(function(){
        //初始化banner
        var banner = new Swiper('#banner',{
            autoplay:3000,
            pagination:'.swiper-pagination'
        });
        //初始化商品展示
        var showList = new Swiper('.content .swiper-container',{
            slidesPerView:4,
            spaceBetween:40,
            prevButton:'.swiper-button-prev',
            nextButton:'.swiper-button-next'
        });
        //页面回顶
        $('.icon4').on('click',function(){
            $('html,body').animate({
                scrollTop:0
            },200)
        });
    })
</script>
</body>
</html>